package com.dhc.service.controller;

import com.dhc.service.entity.vo.AcademyProfessionVo;
import com.dhc.service.service.AcademyService;
import com.dhc.service.utils.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @date 2023/10/09 17:20
 */
@SuppressWarnings({"all"})
@RestController
@RequestMapping("sys/academy")
@CrossOrigin
public class AcademyController {

	@Autowired
	private AcademyService academyService;

	/**
	 * 獲取所有學院，以及下屬專業信息
	 *
	 * @return
	 */
	@GetMapping("linkPro")
	public Result linkPro() {
		List<AcademyProfessionVo> list = academyService.queryAll();
		return Result.ok().data("list", list);
	}

}
